int compute_collision(vector& p,vector& v)
Parameter | Type | Description |
---|---|---|
p | vector& | target position |
v | vector& | target velocity |
Returns TRUE if a collision was found, FALSE for no collision.
This function is used to compute collision for a moving particle. The p and v parameters are the new computed position and velocity parameters. If a collision is found between p and the current position, then both p and v will be modified accordingly.